package org.yefei.homeworkday03;

import java.util.Scanner;

public class Shopping {

	public static void main(String[] args) {
		// 6：双十二 家乐福购物打折，
		// 所有购物打8折，购物满100打六折；会员一律打5折；会员购物超过1000，打4折。输入购物金额，是不是会员，算出实际支付的金额
		double acmoney = 0;
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入用户的身份：");
		String member = sc.next();
		System.out.println("输入购物金额：");
		int money = sc.nextInt();
		if ("非会员".equals(member)) {
			if (money < 100 && money > 0) {
				acmoney = money * 0.8;
				System.out.println("实际支付金额是：" + acmoney);
			} else if (money >= 100) {
				acmoney = money * 0.6;
				System.out.println("实际支付金额是：" + acmoney);
			} else {
				System.out.println("金额不合法！");
			}
		}else if("会员".equals(member)) {
			if (money < 1000 && money > 0) {
				acmoney=money*0.5;
				System.out.println("实际支付金额是：" + acmoney);
			} else if (money >= 1000) {
				acmoney = money * 0.4;
				System.out.println("实际支付金额是：" + acmoney);
			} else {
				System.out.println("金额不合法！");
			}
		} else {
			System.out.println("非人类！");
		}
	}

}
